﻿using BCCommon;
using BCCommon.OAEnums;
using BCDto.OA.Notification.NotificationRecord;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.OA.Notification.NotificationRecord
{
    /// <summary>
    /// OA系统通知记录
    /// </summary>
	public interface INotificationRecordService
    {
        #region  成员方法
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        bool Exists(long notificationRecordId);
        /// <summary>
        /// 添加OA系统通知记录
        /// </summary>
        /// <param name="requestDto">OA系统通知记录信息</param>
        NotificationRecordDto Add(NotificationRecordRequestDto requestDto);
        /// <summary>
        /// 添加OA系统通知记录
        /// </summary>
        /// <param name="requestDtos">OA系统通知记录信息列表</param>
        bool Add(List<NotificationRecordRequestDto> requestDtos);
        /// <summary>
        /// 更新OA系统通知记录
        /// </summary>
        /// <param name="putDto">OA系统通知记录信息</param>
        NotificationRecordDto Update(NotificationRecordPutDto putDto);
        /// <summary>
        /// 开始处理通知
        /// </summary>
        /// <param name="notificationRecordId">通知记录Id</param>
        /// <returns></returns>
        NotificationRecordDto StartHandleNotification(long notificationRecordId);
        /// <summary>
        /// 已处理通知结束
        /// </summary>
        /// <param name="notificationRecordId">通知记录Id</param>
        /// <returns></returns>
        NotificationRecordDto HandledNotification(long notificationRecordId);
        /// <summary>
        /// 关闭处理通知
        /// </summary>
        /// <param name="closeDto">关闭信息</param>
        /// <returns></returns>
        NotificationRecordDto CloseNotification(NotificationRecordCloseDto closeDto);
        /// <summary>
        /// 删除OA系统通知记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        bool Delete(long notificationRecordId);
        /// <summary>
        /// 获取OA系统通知记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        NotificationRecordDto GetEntity(long notificationRecordId);
        /// <summary>
        /// 获取OA系统通知记录
        /// </summary>
        /// <param name="relatedType">相关类型</param>
        /// <param name="processStatus">处理状态</param>
        /// <returns></returns>
        IEnumerable<NotificationRecordSumViewDto> GetNotificationList(OARelatedType relatedType, OAProcessStatus processStatus);
        /// <summary>
        /// 获取OA系统通知记录分页列表
        /// </summary>
        /// <param name="relatedType">相关类型</param>
        /// <param name="processStatus">处理状态</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统通知记录每页数据条数</param>
        PageableList<NotificationRecordDto> Query(OARelatedType relatedType, OAProcessStatus processStatus, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
